Description: Resolve naming collision due to libpcap API changes
 dsniff was written with a function named pcap_init() that predates
 the one in libpcap and is entirely different.  This patch renames it
 out of the way.
Author: Dennis Filder <d.filder@web.de>
Bug-Debian: https://bugs.debian.org/980588
Last-Update: 2021-02-10
---
--- a/tcpnice.c
+++ b/tcpnice.c
@@ -204,7 +204,7 @@
 	
 	filter = copy_argv(argv);
 	
-	if ((pd = pcap_init(intf, filter, 128)) == NULL)
+	if ((pd = pcap_init_dsniff(intf, filter, 128)) == NULL)
 		errx(1, "couldn't initialize sniffing");
 
 	if ((pcap_off = pcap_dloff(pd)) < 0)
--- a/dnsspoof.c
+++ b/dnsspoof.c
@@ -309,7 +309,7 @@
 	else snprintf(buf, sizeof(buf), "udp dst port 53 and not src %s",
 		      libnet_addr2name4(lnet_ip, LIBNET_DONT_RESOLVE));
 	
-	if ((pcap_pd = pcap_init(dev, buf, 128)) == NULL)
+	if ((pcap_pd = pcap_init_dsniff(dev, buf, 128)) == NULL)
 		errx(1, "couldn't initialize sniffing");
 
 	if ((pcap_off = pcap_dloff(pcap_pd)) < 0)
--- a/pcaputil.h
+++ b/pcaputil.h
@@ -11,7 +11,7 @@
 #ifndef PCAPUTIL_H
 #define PCAPUTIL_H
 
-pcap_t *pcap_init(char *intf, char *filter, int snaplen);
+pcap_t *pcap_init_dsniff(char *intf, char *filter, int snaplen);
 
 int	pcap_dloff(pcap_t *pd);
 
--- a/tcpkill.c
+++ b/tcpkill.c
@@ -130,7 +130,7 @@
 	
 	filter = copy_argv(argv);
 	
-	if ((pd = pcap_init(intf, filter, 64)) == NULL)
+	if ((pd = pcap_init_dsniff(intf, filter, 64)) == NULL)
 		errx(1, "couldn't initialize sniffing");
 
 	if ((pcap_off = pcap_dloff(pd)) < 0)
--- a/pcaputil.c
+++ b/pcaputil.c
@@ -63,7 +63,7 @@
 }
 
 pcap_t *
-pcap_init(char *intf, char *filter, int snaplen)
+pcap_init_dsniff(char *intf, char *filter, int snaplen)
 {
 	pcap_t *pd;
 	u_int net, mask;
